import time

from selenium import webdriver
from selenium.webdriver.common.by import By
#打开浏览器
driver = webdriver.Chrome()
#进入ecshopPC演示站
driver.get('https://ecshop.test2.shopex123.com/')
#定位登录按钮并点击
driver.find_element(By.XPATH,'//*[@id="ECS_MEMBERZONE"]/a[1]').click()
#定位登录输入框并输入内容
time.sleep(2)
username = driver.find_element(By.XPATH,'//*[@id="body"]/div[1]/div/div[1]/form/div[1]/div/input')
username.send_keys('a525855722')
time.sleep(2)
password = driver.find_element(By.XPATH,'//*[@id="body"]/div[1]/div/div[1]/form/div[2]/div/input')
password.send_keys('JH13277968935')
#定位登录按钮并点击登录
time.sleep(2)
sign_in = driver.find_element(By.CLASS_NAME,'loginbtn')
sign_in.click()
#关闭浏览器
time.sleep(10)
driver.quit()